{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "5e00e514",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(1, 2, 3, 4, 5, 6)\n"
     ]
    }
   ],
   "source": [
    "it=range(1,7)\n",
    "tpl=tuple(it)\n",
    "print(tpl)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "3cba8d68",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "2\n"
     ]
    }
   ],
   "source": [
    "it=range(1,7)\n",
    "tpl=tuple(it)\n",
    "print(tpl[1])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "96b8b884",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(1, 2, 3, 4, 5, 6, 7, 8)\n"
     ]
    }
   ],
   "source": [
    "tpl=(1,2,3)\n",
    "tpl2=(7,8)\n",
    "tpl1=(4,5,6)\n",
    "tpl3=tpl+tpl1+tpl2\n",
    "print(tpl3)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "id": "b1658062",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "{'学号': '211634321', '姓名': 'Yanjianan', '年龄': '18'}\n"
     ]
    }
   ],
   "source": [
    "dict={'学号':'211634321','姓名':'yanjianan','年龄':'18'}\n",
    "dict['姓名']='Yanjianan'\n",
    "print(dict)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "id": "d5d567d9",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "{'学号': '211634321', '姓名': 'yanjianan', '年龄': '18'}\n"
     ]
    }
   ],
   "source": [
    "dict={'学号':'211634321','姓名':'yanjianan','年龄':'18'}\n",
    "dict2=dict.copy()\n",
    "print(dict2)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "id": "666734b1",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "yanjianan\n"
     ]
    }
   ],
   "source": [
    "dict={'学号':'211634321','姓名':'yanjianan','年龄':'18'}\n",
    "dict2=dict.get('姓名')\n",
    "print(dict2)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "id": "670e1dae",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "None\n"
     ]
    }
   ],
   "source": [
    "dict={'学号':'211634321','姓名':'yanjianan','年龄':'18'}\n",
    "dict2=dict.clear()\n",
    "print(dict2)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "id": "9b7dcac9",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "18\n",
      "{'学号': '211634321', '姓名': 'yanjianan'}\n"
     ]
    }
   ],
   "source": [
    "dict={'学号':'211634321','姓名':'yanjianan','年龄':'18'}\n",
    "dict2=dict.pop('年龄')\n",
    "print(dict2)\n",
    "print(dict)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "03edadf2",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.12"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
